<script type="text/javascript">
function openCompressDialog(obj) {
    $(obj).dialog({id:'compress-dialog', target:'#compress-dialog-target', title:'文件压缩', fresh:true});

    var vals = [];
    $("input[type='checkbox']:checked").each(function (index, item) {
        if($(this).val() != 'on'){
            vals.push($(this).val());
        }
    });
    $("#compressedFiles").val(vals);
}
</script>

<a type="button" class="btn btn-default"
    onclick="openCompressDialog(this)"
    data-icon="compass" title="文件压缩">
    文件压缩
</a>
<div id="compress-dialog-target" data-noinit="true" class="hide">
    <div class="bjui-pageContent">
        <form method="post" action="/filemanager/compress.ajax?path=${relativePath}" class="pageForm" data-toggle="validate">
            <label class="control-label x85">压缩文件名：</label>
            <input type="text" name="compressedFileName" value="" class="required" data-rule="required"/> .zip
            <input type="hidden" id="compressedFiles" name="files" value="" />
        </form>
    </div>
    <div class="bjui-pageFooter">
        <ul>
            <li>
                <button type="button" class="btn-close">关闭</button>
            </li>
            <li>
                <button type="submit" class="btn-blue">保存</button>
            </li>
        </ul>
    </div>
</div>